﻿using Entity.Models.dto;
using Entity.Models.Entities;
using Entity.Models.vo;
using RepositorySys.Models;
using System;
using System.Collections.Generic;

namespace IBLL
{
    /// <summary>
    /// 角色模块接口
    /// 
    /// 作用：定义方法规则
    /// </summary>
    public interface IRoleInfoBLL
    {
        /// <summary>
        /// 角色列表、搜索
        /// </summary>
        /// <returns></returns>
        List<RoleInfoDTO> getRoleShow(string roleName, string page, string limit, out int cont);

        /// <summary>
        /// 添加角色信息
        /// </summary>
        /// <param name="roleInfo"></param>
        /// <returns></returns>
        bool AddRoleInfo(RoleInfo roleInfo);

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="roleIds"></param>
        /// <returns></returns>
        bool DatateRoleInfos(List<string> roleIds);

        /// <summary>
        /// 删除角色信息
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        bool DatateRoleInfo(string roleId);

        /// <summary>
        /// 修改角色信息
        /// </summary>
        /// <param name="role"></param>
        /// <returns></returns>
        bool UpdateRoleInfo(RoleInfo role);

        /// <summary>
        /// 根据账号id查询角色信息
        /// </summary>
        /// <param name="roleid"></param>
        /// <returns></returns>
        RoleInfo getbyRoleInfoId(string roleid);
       
        /// <summary>
        /// 绑定角色
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="roleId"></param>
        /// <returns></returns>
        bool BinUser_Role(List<string> userId, string roleId);

        /// <summary>
        /// 获取角色下已选用户
        /// </summary>
        /// <param name="roleId"></param>
        List<string> getSelectedUser(string roleId);

        /// <summary>
        /// 绑定菜单
        /// </summary>
        /// <param name="menuId"></param>
        /// <param name="roleId"></param>
        /// <returns></returns>
        bool BinMenu_Role(List<string> menuId, string roleId);

        /// <summary>
        /// 获取已选菜单
        /// </summary>
        /// <param name="menuId"></param>
        /// <returns></returns>
        List<string> getSelectedMenu(string roleId);
    }
}
